import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
import ITTechnique from "@/pages/ITTechnique";
import FrontEnd from "@/pages/ITTechnique/FrontEnd";
import BackEnd from "@/pages/ITTechnique/BackEnd";
import Andriod from "@/pages/ITTechnique/Andriod";
import IOS from "@/pages/ITTechnique/IOS";
import Intelligence from "@/pages/ITTechnique/Intelligence";
import DataBase from "@/pages/ITTechnique/DataBase";
import Program from "@/pages/ITTechnique/Program";
import Login from "@/pages/Login";
import Register from "@/pages/Register";
import Homepage from "@/pages/Homepage";
import Person from "@/pages/Person";
import Acrticle from "@/pages/Acrticle/Acrticle";
import Search from '@/components/Search'
import erweima from '@/pages/erweima'
import detail from '@/components/detail'
const router = new VueRouter({
  mode: "history",
  routes: [
    {
      path: '/Acrticle/Acrticle',
      component:Acrticle,

    },
    {
      path: "/",
      component: Homepage,
    },
    {
      path: "/Person",
      component: Person,
    },
    {
      path: "/detail",
      component: detail,
    },
    {
      path: "/erweima",
      component: erweima,
    },
    {
      path: "/search",
      component: Search,
    },
    {
      name: "ittechnique",
      path: "/ITtechnique",
      component: ITTechnique,
      children: [
        {
          name: "fontend",
          path: "fontend",
          component: FrontEnd,
          props($route){
            return {...$route.query}
          }
        },
        {
          name: "backend",
          path: "backend",
          component: BackEnd,
          props($route){
            return {...$route.query}
          }
        },
        {
          name: "andriod",
          path: "andriod",
          component: Andriod,
          props($route){
            return {...$route.query}
          }
        },
        {
          name: "ios",
          path: "ios",
          component: IOS,
          props($route){
            return {...$route.query}
          }
        },
        {
          name: "intelligence",
          path: "intelligence",
          component: Intelligence,
          props($route){
            return {...$route.query}
          }
        },
        {
          name: "database",
          path: "database",
          component: DataBase,
          props($route){
            return {...$route.query}
          }
        },
        {
          name: "program",
          path: "program",
          component: Program,
          props($route){
            return {...$route.query}
          }
        },
      ],
    },
    {
      path: "/register",
      component: Register,
    },
    {
      path: "/login",
      component: Login,
    },
  ],
});
export default router;
